<!DOCTYPE html>
<html>
<head>
<title>修改个人信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport"
			content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta name="format-detection" content="telephone=no" />
		<meta name="format-detection" content="email=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<!--删除默认的苹果工具栏和菜单栏。-->
		<link rel="stylesheet" href="plug-in/ydui/css/ydui.css?rev=@@hash"/>
		<link rel="stylesheet" href="plug-in/ydui/css/demo.css"/>
		<script src="plug-in/ydui/js/ydui.flexible.js"></script>
		<style type="text/css">
			.demo-pagetitle{
				position:relative;
				top:10%;
			}
	    	.m-grids-4{
	    		top:20%;
	    		background:transparent;
	    	}
	    	
			.m-grids-4 .grids-item {
				width: 50%;
			}
			.demo-icons [class^="icon-"]:before, .demo-icons [class*=" icon-"]:before { font-size: 0.6rem; color: #FF685D; }
    	</style>
		<link rel="stylesheet" href="webpage/css/login-main.css" />
		<link rel="stylesheet" href="webpage/css/faultfeedback.min.css" />
		<link rel="stylesheet" href="plug-in/Validform/css/style.css"/>
		<script type="text/javascript">
		</script>
</head>
<body>
	<!-- <div class="div"></div> -->
	<section class="g-flexview">
		<form id="form" name="form" class="registerform" method="post">
		<header class="m-navbar">
        	<a class="navbar-item" href="javascript:history.go(-1)"><i class="back-ico"></i></a>
        	<div class="navbar-center"><span class="navbar-title">修改个人信息</span></div>
        	<input id="js_submit" class="navbar-right" type="submit" value="提交" />
    	</header>
	    <section class="g-scrollview">
	        <div class="m-cell demo-small-pitch">
	        	<div class="cell-item" style="display:none">
	                <div class="cell-left">id:</div>
	                <div class="cell-right"><input id="id" name="id" type="text" class="cell-input" placeholder="请输入用户编码" autocomplete="off" /></div>
	            </div>
	            <div class="cell-item">
	                <div class="cell-left">用户名：</div>
	                <div class="cell-right">
	                	<input id="userName" name="userName" type="text" class="cell-input" placeholder="请输入用户名" autocomplete="off" datatype="*" sucmsg="验证通过！"/>
	                	<span class="Validform_checktip"></span>
	                </div>
	            </div>
	            <div class="cell-item">
	                <div class="cell-left">真实姓名：</div>
	                <div class="cell-right"><input id="userKey" name="userKey" type="text" class="cell-input" placeholder="请输入真实名字" autocomplete="off" datatype="*"/></div>
	            </div>
	            <!-- <div class="cell-item" id="divwxid">
	                <div class="cell-left">微信号：</div>
	                <div class="cell-right"><input id="wxid" name="wxid" type="text" class="cell-input" placeholder="请输入新的微信号" autocomplete="off" datatype="wxid,*" /></div>
	            </div> -->
			</div>
		</section>
		</form>
	</section>
</body>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="plug-in/ydui/js/ydui.js"></script>
<script src="http://malsup.github.io/jquery.form.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/initValidform.js"></script>
<script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
<script type="text/javascript">
	$(function(){
		$.ajax({
			type:'post',
			url:"userController.do?userDatagrid",
			dataType:'Json',
			cache:false,
			success:function(json){
				if(json.success){
					var entity = json.obj;
					$("#id").attr("value",entity.id);
					$("#userName").attr("value",entity.userName);
					$("#userKeyid").attr("value",entity.userKey);
				}
			},
			error:function(){
				
			}
		})
		
	});
	$('#js_submit').on('click', function(){
		if(!StopSubmit()){
			return false;
		}
		var check=confirm("您确定要提交表单吗？");
		if(!check){
			return false;
		}
		//return false;
		$('#form').on('submit', function(){
			$.ajax({
				type: 'post', // 提交方式 get/post
		   		url: "userController.do?doUpdatePassWord", // 需要提交的 url
		  		data:$('form').serialize(),
		   		dataType:"json",
		       	success: function(json){ // data 保存提交后返回的数据，一般为 json 数据
		       		if(json.success){
		       			alert("修改成功");
		        		window.location.href="userController.do?list";
		        		return false;
		       		}
		       	},
		       	error:function(){
		       		alert("请完善信息");
		       	}
			})
			return false;
		})
	})
</script>
</html>